package factory.simplefactory.pizzastore.factory;

import factory.simplefactory.pizzastore.constain.PizzaType;
import factory.simplefactory.pizzastore.pizza.CheesePizza;
import factory.simplefactory.pizzastore.pizza.GreekPizza;
import factory.simplefactory.pizzastore.pizza.Pizza;

public class PizzaFactory {
    public static Pizza createPizza(String pizzaType) {
        switch (pizzaType) {
            case PizzaType.CHEESEPIZZA:
                return new CheesePizza();
            case PizzaType.GREEKPIZZA:
                return new GreekPizza();
            default:
                return null;
        }
    }
}
